1. Field of the Invention
The present invention relates generally to image processing, and more particularly to code-level image processing.
2. Description of the Related Art
In the case of displaying an image, it may be desired to add a name, date, legend, or logo to the image or to mask a particular portion of the image.
As methods of obtaining the encoded data of such an image to which information is added or on which masking is performed, a method that performs encoding after replacing a partial area of an original image with another image (image-level area replacement) and a method that divides an original image into multiple areas, performs encoding area by area, and replaces the encoded data of part of the areas with the encoded data of another image (code-level area replacement) are well known. Japanese Laid-Open Patent Application Nos. 2001-008039 and 2003-078767 are examples of well known literature related to the latter method.
In the encoded data obtained by the above-described image-level or code-level area replacement, information on the area of the original image to be replaced is not stored. Accordingly, the original image before editing cannot be reproduced. For instance, it is not possible to remove a mask and see the original image. Nor is it possible to reproduce the original image without an added legend.
According to the method that performs image-level area replacement, both the original image and an area image to replace a partial image thereof require image data (pixel value data). If each image is prepared in encoded data, first, the encoded data is decoded, then, replacement is performed, and thereafter, re-encoding is required, thus resulting in a great processing load. In the case of irreversible encoded data, image quality is degraded in the decoding and re-encoding processes.
According to the method that performs code-level area replacement, a replacing area image and the area to be replaced of the original image should be in agreement with each other in size, shape, and position. If there is no agreement in size, shape, or position, there are problems in that an image reproduced from encoded data includes distortion and that there is an increase in the overall size. In other words, the replacing area image is limited in size, shape, and position.